import {
  legacy_createStore as createStore, 
  applyMiddleware,
  combineReducers
} from 'redux'
// 用于处理异步action的中间件
import thunk from 'redux-thunk'

// count的reducer
import countReducer from './reducers/count'
// person的reducer
import personReducer from './reducers/person'

// 汇总成总的reducer
const allReducer = combineReducers({
  he: countReducer,
  rens: personReducer 
})

const store = createStore(allReducer, applyMiddleware(thunk))

export default store